/*
 * PipedCommand.h
 *
 *  Created on: Jun 7, 2011
 *      Author: s138077
 */

#ifndef PIPEDCOMMAND_H_
#define PIPEDCOMMAND_H_

#include <fcntl.h> // Open

#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <sys/wait.h>

class Command;

class PipedCommand : public Command {
	private:
		std::vector<Command*>* commands;

	protected:
		bool executeCommand(bool);

	public:
		PipedCommand(std::string, std::vector<std::string>*);
		virtual ~PipedCommand();
		bool runCommand();
		bool runCommand(bool);
		void addCommand(Command* command);

		void addArgument(std::string) { };
		std::vector<std::string>* getArguments() { return NULL; };
		std::string getIOInput() { return NULL; };
		void setIOInput(std::string) { };
		std::string getIOOutput() { return NULL; };
		void setIOOutput(std::string) { };
		bool getAppend() { return NULL; };
		void setAppend(bool) { };
};

#endif /* PIPEDCOMMAND_H_ */
